//
//  NoticeAdvertismnetModel.m
//  PropertyManager
//
//  Created by TNG on 2018/9/12.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "NoticeAdvertismnetModel.h"

@implementation NoticeAdvertismnetModel

+(instancetype)modelWithDic:(NSDictionary *)dic
{
    return [[self alloc] initWithDic:dic];
}

-(instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.noticeID = value;
    }
}

-(CGFloat)contentHeight
{
    CGFloat height = [[NSString filterHTML:_nbContent] boundingRectWithSize:CGSizeMake(WIDTH - 60, MAXFLOAT) withTextFont:font(14)].height;
    if (height > 71) {
        height = 71;
    }
    return height;
}

@end
